package com.ruoyi.project.system.mapper;

import com.ruoyi.project.system.domain.DtProduct;
import com.ruoyi.project.system.domain.vo.PriceItem;
import com.ruoyi.project.system.domain.vo.QueryItem;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
import java.util.Map;

/**
 * 查询产品Mapper接口
 */
public interface DtProductMapper {

    @Select("select id as value, name as label from dt_product where del = '1'")
    List<Map<String, String>> productChoice();

    @Select("select userId as value, `userName` as label from sys_user where status = 0")
    List<Map<String, String>> userChoice();

    List<QueryItem> queryEnableProductList(@Param("userId") Long userId, @Param("type") String type);

    List<PriceItem> queryProductPriceList(@Param("userId") Long userId, @Param("codes") String[] codes);

    PriceItem queryProductPrice(Long userId, Integer productId);

    DtProduct selectDtProductById(Integer id);

    List<DtProduct> selectDtProductListByCodes(String[] codes);

    List<DtProduct> selectDtProductList();

}
